class Solution
{
public:
    int trainingPlan(vector<int>& actions)
    {
        unordered_map<int, int> m;
        for (auto& i : actions)
            m[i]++;
        for (auto& [k, v] : m)
            if (v == 1)
                return k;

        return 0;
    }
};